<?php $this->load->library('urlutility');?>
<style>
#prev {
	margin-top:-313px;
}
#next {
	margin-top:-313px;
}
</style>
<script type="text/javascript" language="javascript">
	$(function() {
		$('#prev').addClass('hide');
		$('#next').addClass('hide');
		$('#foo0').carouFredSel({
			auto:{pauseOnHover: 'resume'},
			scroll:1,
			prev: '#prev',
			next: '#next',
		});
		$('.list_carousel').mouseover(function(){
			$('#prev').removeClass('hide');
			$('#next').removeClass('hide');						  
		});
		$('.list_carousel').mouseout(function(){
			$('#prev').addClass('hide');
			$('#next').addClass('hide');						  
		});
	});
</script>
<?php if(count($listbanner)>0){?>
<div class="list_carousel ov_fl_hidden h277">
  <ul id="foo0" class="h277">
    <?php foreach($listbanner as $k=>$banner){
		if(count($banner)>0){?>
    <li> <a href="<?php echo $this->urlutility->getactivity_detail($banner['activityid'],'','?datefrom='.$_GET['datefrom'].'&provide='.$_GET['provide'].'&price='.$_GET['price'].'&type='.$_GET['type']);?>" class="item ov_fl_hidden"> <img width="886" height="370" class="fl bder_t1_8fa8bc" src="<?php echo base_url()."uploads/activitybanner/".$banner['avatar']; ?>"/> </a> </li>
    <?php }}?>
  </ul>
  <a href="javascript:void(0);" id="prev" class="fl"><img src="<?php echo base_url(); ?>public/images/btn_prev.gif"/></a> <a href="javascript:void(0);" id="next" class="fr"><img src="<?php echo base_url(); ?>public/images/btn_next.gif"/></a> </div>
<?php }?>
<div class="fl w660">
  <h1 class="orange item ff_museo700 mgb0 txt_indent20">Activities Search Result</h1>
  <div class="item bder_d5 txt_indent20 pdt5 pdb5">
    <div class="fl">10 of <?php echo count($total); ?> show&nbsp;&nbsp;
      <input type="text" placeholder="Name" id="activity_name" class="bder_d5 w153 mgl20" value="">
      <input type="submit" id="btnsearch_activity" class="bder_d5 cursor_poiter btn_submit_search" value=" ">
    </div>
    <div class="fr"><img width="10" height="15" onclick="LeftClick3('spnumberpage','sptotalpage','boxoutsize');" src="<?php echo base_url(); ?>public/images/arrow_01.jpg" class="fl cursor_poiter mgt4 mgr-15 pst_relative zindex10"><span class="fl gray f18 mgl-5"><span  id="spnumberpage">1</span>&nbsp;/&nbsp;<span id="sptotalpage"><?php echo ceil(count($total)/10); ?></span>&nbsp;</span><img width="10" height="15" onclick="RightClick3('spnumberpage','sptotalpage','boxoutsize','getajax_activity_search_result',listroomhotel,'<?php echo $_GET['provide'] ?>');" src="<?php echo base_url(); ?>public/images/arrow_01.jpg" class="fl cursor_poiter mgt4 pst_relative zindex10 tran_180deg"></div>
    <div class="fr pdr44 pdt3">Sort by&nbsp;&nbsp;
      <select class="f11 gray bder_d5" id="sortby" onchange="searchbyhotel('sortby');">
        <option value="price">Price</option>
        <option value="recommendations">Our recommendations</option>
        <option value="Popularity">Popularity</option>
      </select>
    </div>
  </div>
  <div class="item" style="overflow:hidden;">
    <div class="item pst_relative zindex10" id="boxoutsize">
      <div class="fl w660" id="box_inside1">
        <?php 
		 foreach($data as $list){?>
        <div class="item bder_b1_d5 pdt12 pdb10">
          <h3 class="blue ff_museo700 f16 mgt0 pdl10 lheight23 cap"><?php echo $list["name"]; ?> <em class="ff_museo500 gray lighter cap f13"><?php echo "<br />".$list["provide"]; ?></em></h3>
          <a href="<?php echo $this->urlutility->getactivity_detail($list['id'],$list['name'],'?datefrom='.$_GET['datefrom'].'&provide='.$_GET['provide'].'&price='.$_GET['price'].'&type='.$_GET['type']);?>"><img width="97" height="75" src="<?php echo base_url()."uploads/activity/".$list["avatar"]; ?>" alt="<?php echo "Best of Myanmar - ".$list["name"]." - ".$list["provide"]." - ".$list["address"]; ?>" title="<?php echo "Best of Myanmar - ".$list["name"]." - ".$list["provide"]." - ".$list["address"]; ?>" class="fl mgr8 pdl10"/> </a>
          <div class="fl w273 pdr20"><strong class="black"><?php echo $list["typeofactivity"] ?></strong><br />
            <span class="black"><?php echo $list["promotion"]; ?>
            <!--... <a href="<?php echo $this->urlutility->getactivity_detail($list['id'],$list['name'],'?datefrom='.$_GET['datefrom'].'&provide='.$_GET['provide'].'&price='.$_GET['price'].'&type='.$_GET['type']);?>" class="blue">more »</a>-->
            </span> </div>
          <a href="<?php echo $this->urlutility->getactivity_detail($list['id'],$list['name'],'?datefrom='.$_GET['datefrom'].'&provide='.$_GET['provide'].'&price='.$_GET['price'].'&type='.$_GET['type']);?>" class="blue">icons</a>
          <div class="fr w60 f11 txt_center ff_museo500"><strong class="f18 orange">
            <?php if(isset($list["price"])==NULL)echo 'N/A';else echo "$".$list["price"] ?>
            </strong><br>
            for 1 pax <a class="item ff_museo500 bgr_143167 white pdt4 pdb3 mgt4 f14" href="<?php echo $this->urlutility->getactivity_detail($list['id'],$list['name'],'?datefrom='.$_GET['datefrom'].'&provide='.$_GET['provide'].'&price='.$_GET['price'].'&type='.$_GET['type']);?>">DETAILS</a> </div>
        </div>
        <?php }?>
      </div>
    </div>
  </div>
  <div class="item pdt16 pdb16">
    <div class="fr"> <img width="10" height="15" class="fl bder_d5 fl pdt4 pdb4 pdl7 pdr9 mgl5 cursor_poiter" onclick="LeftClick3('spnumberpage','sptotalpage','boxoutsize');" src="<?php echo base_url(); ?>public/images/arrow_01.jpg">
      <?php for($i=1;$i<=ceil(count($total)/10);$i++){?>
      <div id="divpager<?php echo $i ?>" class="bder_d5 fl pdt4 pdb4 txt_center w24 mgl5 black cursor_poiter" onclick="loaddata('<?php echo $i ?>','boxoutsize',postdata,'spnumberpage','sptotalpage','getajax_hotel_search_result',listroomhotel);"><?php echo $i ?></div>
      <?php
	}?>
      <img width="10" height="15" class="fl bder_d5 fl pdt4 pdb4 pdl9 pdr7 mgl5 cursor_poiter" src="<?php echo base_url(); ?>public/images/arrow_03.png" onclick="RightClick3('spnumberpage','sptotalpage','boxoutsize','getajax_activity_search_result',listroomhotel,'<?php echo $_GET['provide'] ?>');"> </div>
  </div>
</div>
<div class="fr w193 pdt10">
  <div class="item bgr_gray pdt10">
    <div class="fl pdl10 w173">
      <h3 class="blue ff_museo500 item mgt0 mgb0"><span class="fl">Refine your search&nbsp;</span><img width="20" height="20" class="fl" src="<?php echo base_url(); ?>public/images/iconsearch.png"></h3>
      <h3 class="bgr_orange white txt_indent10 ff_museo500 f15 item pdt6 pdb5 mgt13 mgb3 lighter">Refine your search</h3>
      <div class="item pdt4">
        <input type="checkbox" value="Day Tour & Sightseeing" id="type1" onclick="searchbyhotel('type1');" class="fl mgl10 mgt1">
        Day Tour & Sight-seeing</div>
      <div class="item">
        <input type="checkbox" value="Cultural Touch" id="type2" onclick="searchbyhotel('type2');" class="fl mgl10 mgt1">
        Cultural Touch</div>
      <div class="item">
        <input type="checkbox" value="Actice" id="type3" onclick="searchbyhotel('type3');" class="fl mgl10 mgt1">
        Actice</div>
      <div class="item">
        <input type="checkbox" value="Spa & Massage" id="type4" onclick="searchbyhotel('type4');" class="fl mgl10 mgt1">
        Spa & Massage</div>
      <div class="item">
        <input type="checkbox" value="Shopping" id="type5" onclick="searchbyhotel('type5');" class="fl mgl10 mgt1">
        Shopping</div>
      <a href="#" class="fl pdl10 blue undeline mgb10 mgt7">Need help for the booking call us</a> </div>
  </div>
  <img width="100%" class="fl mgt5" src="<?php echo base_url(); ?>public/images/rightbanner_03.png"> <img width="100%" class="fl mgt5" src="<?php echo base_url(); ?>public/images/rightbanner_03.png"> </div>
<script>
	var listroomhotel=Array();
	
	for(var i=1;i<=1000;i++){		
		listroomhotel[i]=false;		
	}
	listroomhotel[1]=true;
	
	var postdata={datefrom:'<?php echo $_GET['datefrom'] ?>',provide:'<?php echo $_GET['provide'] ?>',type:'<?php echo $_GET['type'] ?>',price:'<?php echo intval($_GET['price']) ?>'<?php if(isset($_GET['sortby'])) echo ",sortby:'".$_GET['sortby']."'";?>,pagenumber:'<?php if(isset($_GET['pagenumber'])) echo intval($_GET['pagenumber']);else echo "1"; ?>'};
	
	$(document).ready(function(){
		$('#activity_name').val('');
		for(var i=0;i<1000;i++){
			if($('#type'+i).is(':checked')==true){
				$('#type'+i).attr('checked', false);
			};
		}
	});
	var type=Array();
	<?php if(isset($_GET['type'])){?>type.push('<?php echo $_GET['type'];?>');<?php }?>
	
	function searchbyhotel(number){
		for(var r=1;r<=8;r++){
			if(number=="type"+r){
				if($('#'+number).is(':checked')==true){
					type.push($('#'+number).val());			
				}else{	
					var check=-1;
					for(var i=0;i<type.length;i++){
						if(type[i]==$('#'+number).val()){
							check=i;						
						}	
					}
					type.splice(check,1);
				}
			}
		}
		postdata.type=type;	
		postdata.sortby=$('#sortby').val()
		$.get('<?php echo base_url(); ?>home/ajax/getajax_activity_search_result',postdata,function(data){						
			$('#boxoutsize').html(data);
		});	 
	}
</script>
